import { createApp } from "vue";
import App from "./App.vue";
const app = createApp(App);


import ElementPlus from "element-plus";
import "element-plus/dist/index.css";
import "./styles/main.scss";
import "./styles/element.scss";

import router from "./router";

import store from "./store";

import mitt from "mitt";

const eventBus = mitt();// 创建事件总线

app.provide("bus", eventBus);// 将事件总线提供给整个应用

import { dynamicRem } from "./utils/setRem"
dynamicRem();


import zhCn from 'element-plus/es/locale/lang/zh-cn'

app.use(router)
  .use(store)
  .use(ElementPlus, {
    locale: zhCn,
  })
  .mount("#app"); // 先挂载Vue应用
